<template>


    <el-menu  default-active="/" class="el-menu-demo" mode="horizontal" :router="true" @select="handleSelect" >
        <el-menu-item index="/" ><i class="w-icon-home"></i></el-menu-item>
        <el-menu-item index="application" >应用</el-menu-item>
        <el-menu-item index="scripts" >脚本</el-menu-item>
       <label @click ='sync()' class="right-icon"><i class="w-icon-reload"></i></label>
    </el-menu>

</template>

<script>
    export default {
        data() {
            return {

            }
        },

        methods:{
            sync:function () {
                this.$http.get('api/sync').then(function (res) {
                    console.log(res)
                })
            },
            handleSelect:function (key,keyPath) {
                console.log(key,keyPath)
            }
        }
    }
</script>

<style scoped>
    i:hover { color: #0300ff;}
    .right-icon { position: absolute;padding-top: 20px;right: 50px}

</style>